package whf.framework.web.query;

/**
 * @author wanghaifeng
 *
 */
public abstract class Field {
	protected String name;
	
	protected String[] values;
	
	public Field(String name, String[] values){
		if(name == null || values == null || values.length == 0){
			throw new IllegalArgumentException("property name and value can't be empty!");
		}
		this.name = name;
		this.values = values;
	}
	
	public String getName() {
		return this.name;
	}
	
	public String[] getValues(){
		return this.values;
	}
	
	public String toString(){
		return "name:" + this.name + "\tvalue:" + this.getValues();
	}
	
	public abstract String toHQLString();
}
